/*
 * Pressure_A.h
 *
 * Created: 3/21/2013 8:02:56 AM
 *  Author: Parag
 */ 


#ifndef PRESSURE_A_H_
#define PRESSURE_A_H_

#include <avr/io.h>
#include <stdint.h>

/*
This is me blowing casually:
                                      
	The Pressure Data is: 15(int) or F(Hex) <--(atmospheric/no blow)                                      
		The Pressure Data is: 28(int) or 1C(Hex)                                      
		The Pressure Data is: 28(int) or 1C(Hex)                                                                          
	The Pressure Data is: 15(int) or F(Hex)                                       
 
Our max depth target or 1.55V reading(maybe 8 psi above atmospheric):
		The Pressure Data is: 88(int) or 58(Hex)                                      
		The Pressure Data is: 88(int) or 58(Hex)                                      
*/

void ADCSetup();

//Call this function to start an ADC conversion
void ADCStartConversion();
void ADCClearConversionFlag();
int ADCIsConversionCompleteFlagSet();
/*
ADCAquire()
PreCondition: none
Post Condition: returns the voltage reading
Note: Voltage read is always 20% of the original and is compared to VCC or ARef

Error Note: No realistic errors; if you read 0X3FF meaning its recieving above 10V then error. This will never happen
*/
uint16_t ADCAquire();


#endif /* PRESSURE_A_H_ */